/**
 * 
 */
package model;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 * @author annvcit
 * @full_name Nguyen Van Chuc An
 * @date_created Dec 23, 2014
 * @email annvcit@gmail.com
 */
public class DBConnection {
	
	
	public static Connection getConnection() {
		Connection connection = null;
		try {
			Class.forName("com.mysql.jdbc.Driver").newInstance();
			String url = "jdbc:mysql://localhost/demo_webservice";
			String user = "annvcit_mysql";
			String password = "nguyenvanchucan"	;
			connection = DriverManager.getConnection(url, user, password);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return connection;
	}
	public static void main(String[] args) {
		System.out.println(getConnection());
	}
}
